package fh.app4stud.mensa.activities;

import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TabHost;
import android.widget.TextView;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import fh.app4stud.mensa.R;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: ifi
 * Date: 30.04.11
 * Time: 12:46
 * To change this template use File | Settings | File Templates.
 */
public class LocationsList extends MapActivity{

    private TabHost tabhost;
    private ListView listView;
    private MapView mapView;
    List<GeoPoint> pointsList;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.locations_list);

        tabhost = (TabHost)findViewById(android.R.id.tabhost);
        tabhost.setup();

        listView = (ListView)findViewById(R.id.list);
        listView.setEmptyView((TextView)findViewById(R.id.empty));

        pointsList = new ArrayList<GeoPoint>();
        pointsList.add(new GeoPoint((int)(32.864*1E6), (int)(-117.2353*1E6)));
        pointsList.add(new GeoPoint((int)(37.441*1E6), (int)(-122.1419*1E6)));

        listView.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, pointsList));
    }

    @Override
    protected boolean isRouteDisplayed() {
        return false;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
